package com.gxc.service.user.service.impl;

import com.gxc.service.user.entity.UserEntity;
import com.gxc.service.user.repository.UserRepository;
import com.gxc.service.user.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author GongXincheng
 * @since 2019-10-10 13:54
 */
@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserRepository userRepository;

    @Override
    public UserEntity getUserById(Long id) {
        return userRepository.findById(id).orElse(null);
    }
}
